<template>
    <div class="issue">
        <head_><h1>{{datalist.question}}</h1></head_>
        <!-- 内容 -->
        <div class="box">
            <h1 v-html="datalist.answer" class="content"></h1>
            <div>
                <div>
                    <van-icon name="like-o" color='red' />
                    <span> 有用</span>
                </div>
                <div>
                    <van-icon name="like-o" />
                    <span> 无用</span>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    import Vue from 'vue';
    import { Icon } from 'vant';
    Vue.use(Icon);

    import head_ from "./header";
    export default {
        props: {

        },
        data() {
            return {
                datalist: null
            };
        },
        methods: {

        },
        components: {
            head_
        },
        beforeMount(){
            this.datalist = JSON.parse(this.$route.params.data);
            // console.log(JSON.parse(this.$route.params.data))
            console.log(this.$route.params.data)
        }
    };
</script>

<style scoped lang="less">
    .box {
        width: 80%;
        // border: 1px solid #ccc;
        padding: .1rem;
        position: absolute;
        top: 10%;
        left: 50%;
        transform: translate(-50%);
        >h1 {font-size: .28rem;}
        >div{
            border-top: 1px solid #eee;
            margin-top: .2rem;
            padding-top: .2rem;
            font-size: .32rem;
            display: flex;
            justify-content: space-evenly;
            >div {
                box-sizing: border-box;
                // height: .8rem;
                // border: 1px solid;
                display: flex;
                flex-direction: column;
                align-items: center;


            }
        }

    }
    
</style>
